<template>
  <a-modal v-model:open="modelValue" v-bind="$attrs" @cancel="close" @ok="ok"></a-modal>
</template>

<script setup lang="ts">
const modelValue = defineModel<boolean>({ default: false })
const emits = defineEmits<{
  (e: 'update:modelValue', value: boolean): void
  (e: 'close'): void
  (e: 'ok'): void
}>()

function close() {
  modelValue.value = false
  emits('close')
}

function ok() {
  modelValue.value = false
  emits('ok')
}
</script>
